/**
 * Created by w2ex on 08/11/2016.
 */
import env from './env'
import { API } from './constants'
const API_BASE_CONFIGS = {
    development: 'http://admin.mtest.inf-technology.com/api',
    testing: 'http://admin.mauto.infinitsea.com/api',
    production: 'http://admin.mauto.inf-technology.com/api'
}

const API_BASE = API_BASE_CONFIGS[env]

export default {
	[API.POST_CAR_SAVE]: params => API_BASE + '/car/save',
	[API.GET_CARBRAND_MODE]: params => API_BASE + `/carBasic/carModel/list/${params.cbId}`,
	[API.GET_CARBRAND_LIST]: params => API_BASE + '/carBasic/carBrand/list',
	[API.POST_FEEDBACK]: params => API_BASE + '/feedback/save',
    [API.LIST_ENTERPRISE]: params => API_BASE + `/enterprise/list`,
    [API.GET_ENTERPRISE_DETAIL]: params => API_BASE + `/enterprise/detail/${params.id}`,
    [API.GET_ENTERPRISE_NEAREST]: params => API_BASE + `/enterprise/nearest/${params.from}`,
    [API.LIST_CARDOCTOR]: params => API_BASE + '/carDoctor/list',
    [API.LIST_CUSTOMER_SERVICE]: params => API_BASE + `/customerService/list`,
    [API.LIST_COMMENT]: params => API_BASE + `/comment/list`,
    [API.GET_CARDOCTOR_DETAIL]: params => API_BASE + `/carDoctor/detail/${params.id}`,
    [API.GET_ONLINE_ENQUIRY]: params => API_BASE + `/enquiry/save/${params.account}`,
    [API.GET_GOODSLIST]: params => API_BASE + `/goods/list/${params.carPrice}`,
    [API.POST_ORDER]: params => API_BASE + '/order/save',
    [API.GET_ORDER_LIST]: params => API_BASE + '/order/list/0',
    [API.POST_ORDER_CANCEL]: params => API_BASE + '/order/cancel',
    [API.POST_ORDER_CONFIRM]: params => API_BASE + '/order/confirm',
    [API.GET_ORDER_DETAIL]: params => API_BASE + `/order/detail/${params.id}`,
    [API.GET_DICT_LIST]: params => API_BASE + `/dict/list/${params.key}`,
    [API.GET_ORDER_COUNT]: params => API_BASE + '/order/count',
    [API.POST_COMMENT]: params => API_BASE + '/comment/save',
    [API.POST_ORDER_SIGN]: params => API_BASE + '/order/sign',
    [API.POST_ORDER_MODIFY]: params => API_BASE + '/order/modify',
    [API.GET_WX_SIGNATURE]: params => API_BASE + '/weixin/getSignature',
    [API.GET_VALID_CODE]: params => API_BASE + `/people/getCode/${params.phone}`,
    [API.POST_PEOPLE_BIND]: params => API_BASE + '/people/bind',
    [API.GET_ACTIVITY_QRCODE]: params => API_BASE + `/activityCondition/save`,
    [API.GET_ACTIVITY_DETAIL]: params => API_BASE + `/activityCondition/detail/1`,
    [API.POST_ACTIVITY_ADDR]: params => API_BASE + `/activityCondition/receivePrize`,
    [API.GET_ALL_ORDER]:params => API_BASE + `/order/allList`,
    [API.GET_MAINTANCE_DETAIL]:params => API_BASE +`/order/jy/detail`,
    [API.POST_ORDER_MAINTANCECANCEL]: params => API_BASE + `/order/jy/cancel`,
    [API.POST_ORDER_NEWCONTACT]: params => API_BASE + `/people/saveContact`,
    [API.GET_CONTACT_DETAIL]: params => API_BASE + `/people/contactDetail`,
    [API.GET_SERVICE_ITEMS]:params => API_BASE + `/order/jy/getFwItems`,
    [API.GET_ALL_ITEMS]:params => API_BASE + `/order/jy/getWxItems`,
    [API.GET_REPORT]:params => API_BASE + `/order/jy/jcbgDetail`,
    [API.POST_NEWORDER]: params => API_BASE + `/order/jy/save`,
    [API.POST_UPDATEMILEAGE]: params => API_BASE + '/car/updateMileage',
    [API.GET_CARDETAIL]: params => API_BASE + '/car/detail',
}
